This application claims the benefit of a Japanese Patent Application No. 2001-359449 filed Nov. 26, 2002, in the Japanese Patent Office, the disclosure of which is hereby incorporated by reference.
1. Field of the Invention
The present invention generally relates to image processing methods, image processing apparatus, image output apparatus and storage media, and more particularly to an image processing method for processing graphics and the like to be output to image output apparatus such as a printer and a display unit, an image processing apparatus and an image output apparatus which employ such an image processing method, and a computer-readable storage medium which stores a program for causing a computer to process images using such an image processing method.
2. Description of the Related Art
Recently, in personal computers (PCs), applications such as graphic design applications often process graphics having arbitrary shapes using free straight lines and free curves. In order to output such graphics to an image output apparatus such as a printer and a display unit, a coordinate transformation is required to transform real number coordinates or vector coordinates describing the graphics into integer coordinates. Generally, this transformation process is called a scan conversion or a scan line conversion.
In addition, a “clipping” is often made in such applications. The “clipping” sets an arbitrary graphic for specifying a plot effective range. In this case, an overlapping portion between a clip region and a graphic region becomes an output graphic.
The above described processing of the graphics require a long processing time, and in recent personal computers, a hardware called a graphic accelerator is used to perform the processing of the graphics.
FIG. 1 is a system block diagram showing an example of a conventional image processing apparatus which performs the above described processing of the graphics. An image processing apparatus 1 shown in FIG. 1 includes a graphic path input section 2, a clip path input section 3, a plot path generator 4, a plot region run generator 8, a plot section 9, and an image memory 9. An output of the image processing apparatus 1 is supplied to an image output apparatus 11 such as a printer and a display unit.
A graphic path of the graphic to be plotted is input to the graphic path input section 2, and a clip path is input to the clip path input section 3. A “path” refers to a vector set of a plurality of straight lines connected at end points, and one path is formed by connecting a starting point of a first straight line and a terminating point of a last straight line. One path describes an arbitrary polygonal closed region. The input path is a single path or, is formed by a plurality of paths in the case of a path which includes another path as in the case of a donut-shaped graphic, for example.
In order to obtain an overlapping portion between the closed regions which are specified by the graphic path which is input to the graphic path input section 2 and the clip path which is input to the clip path input section 3, the plot path generator 4 generates a new path which surrounds the overlapping portion from the graphic path and the clip path. In a case where the graphic path is a triangle shown in FIG. 2A and the clip path is a rectangle shown in FIG. 2B, the new path surrounding the overlapping portion becomes a hexagon shown in FIG. 2C. This new path is generated by obtaining positional relationships such as inclusion, exclusion and partial inclusion (intersection) between the graphic path and the clip path, and carrying out calculations such as obtaining intersecting coordinate points in the case of the partial inclusion.
The new path generated by the plot path generator 4 is subjected to a scan line conversion in the plot region run generator 8, and a run generated by the plot region run generator 8 is plotted by the plot section 9 and stored in the image memory 10. The run stored in the image memory 10 is output to the image output apparatus 11.
On the other hand, a Japanese Laid-Open Patent Application No. 2000-149036 proposes a graphic processing method which interprets a plot instruction, converts the interpreted plot instruction into a straight line vector (hereinafter referred to as a “line vector”) in a vector data generator, and generates by a display list generator a display list indicating plot elements and a display list indicating clip elements for restricting a plot region of the plot elements. Linear information included in the display lists is vector information having X-coordinates in real number coordinates. An intersecting point of the X real number coordinates and Y integer coordinates is calculated, and the X real number coordinates are sorted to obtain integer coordinates.
The image processing apparatus 1 shown in FIG. 1 has a problem in that a long processing time is required at a stage where the plot path generator 4 generates the new path surrounding the overlapping portion between the graphic path and the clip path.
On the other hand, the graphic processing method proposed in the Japanese Laid-Open Patent Application No. 2000-149036 has problems in that real number calculations are required up to a time immediately prior to the plotting, and the processing speed is slow.